home *** CD-ROM | disk | FTP | other *** search
/ Animation / Animation Vol.1 (Profi ROM)(1994).iso / pool / updates / symantec / rtlinc.exe / DISP.H < prev    next >
C/C++ Source or Header  |  1993-06-28  |  4KB  |  122 lines

  1. /*_ disp.h   Thu Dec  6 1990 */
  2. /* Copyright (C) 1985-1990 by Walter Bright    */
  3. /* All rights reserved                    */
  4. /* Written by Walter Bright                */
  5.  
  6. #ifndef __DISP_H
  7. #define __DISP_H    1    /* prevent multiple #include's        */
  8.  
  9. #if __cplusplus
  10. extern "C" {
  11. #endif
  12.  
  13. extern    int
  14.     __cdecl disp_printf(char *,...),
  15.     __cdecl disp_getmode(void),
  16.     __cdecl disp_getattr(void),
  17.     __cdecl disp_putc(int);
  18. extern    void
  19.     __cdecl disp_levelblockpoke(int,int,int,int,unsigned,unsigned *,unsigned,unsigned *,unsigned),
  20.     __cdecl disp_open(void),
  21.     __cdecl disp_puts(const char *),
  22.     __cdecl disp_box(int,int,unsigned,unsigned,unsigned,unsigned),
  23.     __cdecl disp_close(void),
  24.     __cdecl disp_usebios(void),
  25.     __cdecl disp_move(int,int),
  26.     __cdecl disp_flush(void),
  27.     __cdecl disp_eeol(void),
  28.     __cdecl disp_eeop(void),
  29.     __cdecl disp_startstand(void),
  30.     __cdecl disp_endstand(void),
  31.     __cdecl disp_setattr(int),
  32.     __cdecl disp_setcursortype(int),
  33.     __cdecl disp_pokew(int,int,unsigned short),
  34.     __cdecl disp_scroll(int,unsigned,unsigned,unsigned,unsigned,unsigned),
  35.     __cdecl disp_setmode(unsigned char),
  36.     __cdecl disp_peekbox(unsigned short *,unsigned,unsigned,unsigned,unsigned),
  37.     __cdecl disp_pokebox(unsigned short *,unsigned,unsigned,unsigned,unsigned),
  38.     __cdecl disp_set43(void),
  39.     __cdecl disp_reset43(void),
  40.     __cdecl disp_fillbox(unsigned,unsigned,unsigned,unsigned,unsigned),
  41.     __cdecl disp_hidecursor(void),
  42.     __cdecl disp_showcursor(void);
  43. extern    unsigned short __cdecl disp_peekw(int,int);
  44.  
  45. #if M_UNIX || M_XENIX
  46. extern unsigned char __cdecl disp_scomode, __cdecl disp_captured;
  47. extern int __cdecl disp_vt_number;
  48. extern char __cdecl *disp_offset;
  49. #endif
  50.  
  51. /***************************
  52.  * Some attributes for the text display adapters for disp_setattr():
  53.  */
  54.  
  55. #define DISP_REVERSEVIDEO    0x70
  56. #define DISP_NORMAL        0x07
  57. #define DISP_UNDERLINE        0x01
  58. #define DISP_NONDISPLAY        0x00
  59.  
  60. /* The following attribute bits should be OR'ed in:    */
  61. #define DISP_INTENSITY        0x08
  62. #define DISP_BLINK        0x80
  63.  
  64. /*****************************
  65.  * Values for disp_setcursortype():
  66.  */
  67.  
  68. #define DISP_CURSORBLOCK (disp_mono ? 0x000C : 0x0007)    /* block cursor        */
  69. #define DISP_CURSORHALF     (disp_mono ? 0x060C : 0x0307)    /* half-size cursor */
  70. #define DISP_CURSORUL     (disp_mono ? 0x0B0C : 0x0707)    /* underline cursor */
  71.  
  72. /******************************
  73.  * Display state.
  74.  */
  75.  
  76. #pragma pack(1)
  77.  
  78. typedef struct disp_t
  79. {
  80.     unsigned numrows;        /* # of rows in display            */
  81.     unsigned numcols;        /* # of columns in display        */
  82.     unsigned cursorrow;        /* cursor position            */
  83.     unsigned cursorcol;
  84.     unsigned char mono;        /* 0 for color, 1 for monochrome    */
  85.     unsigned char snowycga;    /* if 1, then the display is an IBM snowy CGA    */
  86.     unsigned char mode;        /* current display mode            */
  87.     unsigned char inited;    /* 1 if display package is opened    */
  88.     unsigned char ega;        /* 1 if IBM EGA                */
  89.     unsigned char reserved[3];    /* round out to dword size        */
  90.  
  91.     union _disp
  92.     {
  93.     unsigned short __far *base;    /* base pointer into screen    */
  94.     struct _disp1
  95.     {   unsigned offset;
  96.         unsigned short base;
  97.     } _disp1x;
  98.     } _dispx;
  99. } disp_t;
  100.  
  101. #pragma pack()
  102.  
  103. extern disp_t __cdecl disp_state;
  104.  
  105. /* For backwards compatibility    */
  106. #define disp_numrows    disp_state.numrows
  107. #define disp_numcols    disp_state.numcols
  108. #define disp_cursorrow    disp_state.cursorrow
  109. #define disp_cursorcol    disp_state.cursorcol
  110. #define disp_mono    disp_state.mono
  111. #define disp_snowycga    disp_state.snowycga
  112. #define disp_mode    disp_state.mode
  113. #define disp_inited    disp_state.inited
  114. #define disp_ega    disp_state.ega
  115. #define disp_base    disp_state._dispx._disp1x.base
  116.  
  117. #if __cplusplus
  118. }
  119. #endif
  120.  
  121. #endif /* __DISP_H */
  122.